package com.mofeng.myshop.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户详细信息
 * </p>
 *
 * @author MoFeng
 * @since 2024-04-17
 */
@Data
@Accessors(chain = true)
@TableName("tb_user_info")
@Schema(name = "UserInfo对象", description = "用户详细信息")
public class UserInfo implements Serializable {

    @TableId(value = "id", type = IdType.NONE)
    @Schema(description = "用户 ID")
    protected Long id;

    @Schema(description = "Steam ID")
    private String steamId;

    @Schema(description = "游戏 ID")
    private String gameId;

    @Schema(description = "qq ")
    private String qq;

    @Schema(description = "余额 ")
    private String money;

    @Schema(description = "消费金额")
    private String amount;

    @Schema(description = "游戏名 ")
    private String gameName;

    @Schema(description = "性别")
    private String sex;

    @Schema(description = "领取新人奖励")
    private String receiveState;

    @Schema(description = "简介")
    private String introduction;

    @Schema(description = "地址")
    private String address;

    @Schema(description = "邀请码UUID")
    private String invitationCode;

    @Schema(description = "邀请码用户")
    private Long invitationUser;


    public void setMoneyDouble(double money) {
        this.money = String.format("%.3f", money);
    }

    public void setAmountDouble(double amount) {
        this.amount = String.format("%.3f", amount);
    }
}
